import routerComponentName from '@/config/route-component-name'

export default [
  {
    path: '/order',
    component: () => import('@/layout/index.vue'),
    redirect: '/order/list',
    name: 'order',
    meta: {
      title: '服务工单',
      icon: 'Tickets',
    },
    children: [
      {
        path: 'new',
        component: () => import('@/views/order/new/index.vue'),
        name: 'newOrder',
        meta: {
          title: '新建工单',
          keepAlive: true,
          componentName: routerComponentName.order.orderCreate,
        },
        hidden: true,
      },
      {
        path: 'list',
        component: () => import('@/views/order/list/index.vue'),
        name: 'orderList',
        meta: {
          title: '工单列表',
          keepAlive: true,
          affix: true,
          componentName: routerComponentName.order.orderList,
        },
      },
      // {
      //   path: 'part',
      //   component: () => import('@/views/order/part/index.vue'),
      //   name: 'Orderparts',
      //   meta: { title: '工单物料', keepAlive: true },
      // },
      // {
      //   path: 'ocost',
      //   component: () => import('@/views/order/ocost/index.vue'),
      //   name: 'Orderocost',
      //   meta: { title: '工单费用', keepAlive: true },
      // },
      //跳转页面
      {
        path: 'odetail/:id',
        component: () => import('@/views/order/detail/index.vue'),
        name: 'oDetail',
        meta: {
          title: '工单详情',
          keepAlive: true,
          componentName: routerComponentName.order.orderDetail,
        },
        hidden: true,
      },
      {
        path: 'preturn',
        component: () => import('@/views/order/parts/preturn/index.vue'),
        name: 'pReturn',
        meta: {
          title: '旧件退回',
          keepAlive: true,
          componentName: routerComponentName.order.returnOldPart,
        },
        hidden: true,
      },
      // {
      //   path: 'settlement',
      //   component: () => import('@/views/order/settlement/index.vue'),
      //   name: 'settlement',
      //   meta: { title: '结算列表', keepAlive: true },
      // },
      {
        path: 'archived',
        component: () => import('@/views/order/archived/index.vue'),
        name: 'archived',
        meta: {
          title: '归档列表',
          keepAlive: true,
          componentName: routerComponentName.order.archiveList,
        },
      },
      // {
      //   path: 'history',
      //   component: () => import('@/views/order/history/index.vue'),
      //   name: 'history',
      //   meta: {
      //     title: '历史工单',
      //     keepAlive: true,
      //     componentName: routerComponentName.order.historyOrderList,
      //   },
      // },
      {
        path: 'historyDetail/:id',
        component: () => import('@/views/order/history/odetail/index.vue'),
        name: 'historyDetail',
        meta: {
          title: '历史工单详情',
          keepAlive: true,
          componentName: routerComponentName.order.historyOrderDetail,
        },
        hidden: true,
      },
      {
        path: 'orderExcelImport',
        component: () => import('@/views/excel/index.vue'),
        name: 'orderExcelImport',
        meta: {
          title: '工单资料导入',
          keepAlive: true,
          componentName: routerComponentName.common.import,
        },
        hidden: true,
      },
      {
        path: 'orderhistoryExcelImport',
        component: () => import('@/views/excel/index.vue'),
        name: 'orderhistoryExcelImport',
        meta: {
          title: '历史工单导入',
          keepAlive: true,
          componentName: routerComponentName.common.import,
        },
        hidden: true,
      },
      {
        path: 'fee/standard/create',
        component: () => import('@/views/order/service-cost-stanard/create/Index.vue'),
        name: 'feeStandardCreate',
        meta: {
          title: '添加收费标准',
          keepAlive: true,
          componentName: routerComponentName.order.feeStandardForm,
        },
        hidden: true,
      },
      {
        path: 'fee/standard/update/:id',
        component: () => import('@/views/order/service-cost-stanard/create/Index.vue'),
        name: 'feeStandardUpdate',
        meta: {
          title: '编辑收费标准',
          keepAlive: true,
          componentName: routerComponentName.order.feeStandardForm,
        },
        hidden: true,
      },
      {
        path: 'good/settle/create',
        component: () => import('@/views/order/good-settle-create/Index.vue'),
        name: 'goodSettleCreate',
        meta: {
          title: '添加产品结算',
          keepAlive: true,
          componentName: routerComponentName.order.goodSettleForm,
        },
        hidden: true,
      },
      {
        path: 'good/settle/update/:id',
        component: () => import('@/views/order/good-settle-create/Index.vue'),
        name: 'goodSettleUpdate',
        meta: {
          title: '编辑产品结算',
          keepAlive: true,
          componentName: routerComponentName.order.goodSettleForm,
        },
        hidden: true,
      },
      {
        path: 'custom/form/create',
        component: () => import('@/views/order/custom/form/index.vue'),
        name: 'CreateOrderCustomForm',
        meta: {
          title: '新建自定义表单',
          keepAlive: true,
          componentName: routerComponentName.order.customForm,
        },
        hidden: true,
      },
      {
        path: 'custom/form/update/:id',
        component: () => import('@/views/order/custom/form/index.vue'),
        name: 'UpdateOrderCustomForm',
        meta: {
          title: '修改自定义表单',
          keepAlive: true,
          componentName: routerComponentName.order.customForm,
        },
        hidden: true,
      },
      {
        path: 'custom/templates',
        component: () => import('@/views/order/custom/templates/index.vue'),
        name: 'OrderCustomTemplates',
        meta: {
          title: '自定义模板列表',
          keepAlive: true,
          componentName: routerComponentName.order.customTemplates,
        },
        hidden: true,
      },
      {
        path: 'custom/initiate/process/:id',
        component: () => import('@/views/order/custom/initiate-process/index.vue'),
        name: 'OrderCustomInitiateProcess',
        meta: {
          title: '自定义模板发起流程',
          keepAlive: true,
          componentName: routerComponentName.order.customTemplateInitiateProcess,
        },
        hidden: true,
      },
      {
        path: 'custom/data/manager/:id',
        component: () => import('@/views/order/custom/data-manager/index.vue'),
        name: 'OrderCustomDataManager',
        meta: {
          title: '自定义模板数据管理',
          keepAlive: true,
          componentName: routerComponentName.order.customTemplateDataManager,
        },
        hideen: true,
      },
      {
        path: 'custom/process/update/:id',
        component: () => import('@/views/order/custom/process/index.vue'),
        name: 'OrderCustomProcessUpdate',
        meta: {
          title: '修改自定义流程',
          KeepAlive: true,
          componentName: routerComponentName.order.customTemplateInitiateProcess,
        },
        hidden: true,
      },
    ],
  },
]
